from django.contrib import admin
from .models import Test

# Register your models here.

class TestModelAdmin(admin.ModelAdmin):
    list_display = ("id", "name", "enabled", "sex", "create_time", "update_time") # 设置显示哪些字段
    list_filter = ("id", "name", "enabled", "sex") # 添加过滤器
    search_fields = ("id", "name") # 添加搜索功能

admin.site.register(Test, TestModelAdmin)